Defer package summaries until cleanup - #23552
Conversation
|
Thanks for your pull request. This has been closed because it appears to be missing the pull request template, perhaps because this was written by an AI not a human. We require humans to read and fill in these templates. Please edit this pull request to fill in the current pull request template. This workflow will reopen this pull request automatically once the template is complete. Do not open a new pull request for this. |
There was a problem hiding this comment.
Pull request overview
This PR restructures brew install/reinstall/upgrade end-of-run output so formula/cask caveats are collected during installation and displayed once after cleanup, including before the final upgrade summary.
Changes:
- Add
Homebrew::Install.finish_installationto centralize install cleanup + message finalization across commands. - Stop printing formula/cask caveats inline during installation; record them for deferred display via
Homebrew.messages. - Update command specs to assert the new cleanup → caveats/message ordering and new
display_messagesparameters.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Library/Homebrew/install.rb | Adds finish_installation helper to run cleanup and display deferred messages/caveats. |
| Library/Homebrew/formula_installer.rb | Switches formula caveats handling from inline printing to recording for deferred display. |
| Library/Homebrew/cask/installer.rb | Stops inline caveats printing during cask install by no longer printing the returned caveats string. |
| Library/Homebrew/cask/upgrade.rb | Stops inline caveats printing during cask upgrade by no longer printing the returned caveats string. |
| Library/Homebrew/cmd/install.rb | Uses Install.finish_installation instead of inlining cleanup/message display. |
| Library/Homebrew/cmd/reinstall.rb | Uses Install.finish_installation and removes now-redundant requires. |
| Library/Homebrew/cmd/upgrade.rb | Uses Install.finish_installation so caveats/messages print before the final upgrade summary. |
| Library/Homebrew/test/install_spec.rb | Adds coverage for finish_installation ordering (cleanup before message display). |
| Library/Homebrew/test/formula_installer_spec.rb | Adds coverage ensuring formula caveats are recorded without inline stdout output. |
| Library/Homebrew/test/cask/installer_spec.rb | Updates expectation to record cask caveats without inline stdout output. |
| Library/Homebrew/test/cmd/install_spec.rb | Updates command expectations for deferred caveats display via force_caveats. |
| Library/Homebrew/test/cmd/reinstall_spec.rb | Updates command expectations for deferred caveats display via force_caveats. |
| Library/Homebrew/test/cmd/upgrade_spec.rb | Updates command expectations for deferred caveats display via force_caveats. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
227d58b to
2c37773
Compare
8fe7695 to
9149c17
Compare
9149c17 to
08bd988
Compare
- collect formula and cask caveats without inline output - share cleanup and message finalisation across commands - print one caveat summary before the final upgrade result
08bd988 to
dc0ed6d
Compare
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.6 GPT Sol xhigh with local review and testing.